<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
<f:view>
	<h:form id='form'>
		<h:head>
<f:loadBundle basename="messages" var="msgs" />
<title><h:outputText value="#{msgs.title}" /></title>

<style type="text/css" title="currentStyle">
	@import "../../resources/css/datatable_page.css";
	@import "../../resources/css/datatable_table.css";
	@import "${facesContext.externalContext.requestContextPath}/views/css/theme.css";
</style>

<link
	href="${facesContext.externalContext.requestContextPath}/resources/css/header.css"
	rel="stylesheet" />

<script type="text/javascript" src="../../resources/script/jquery.js"></script>
<script type="text/javascript"
	src="../../resources/script/jquery.dataTables.js"></script>

<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#users_table').dataTable();
	});
</script>




		</h:head>
		<body>



			<ui:include src="../header/header.xhtml" />
			<br />
			<br />
			<br />

			<p></p>


			<div id="demo">
				<table class="display" id="users_table">
					<thead>
						<tr>
							<th><h:outputText value="#{msg.username}" /></th>
							<th><h:outputText value="#{msg.email}" /></th>
							<th><h:outputText value="#{msg.address}" /></th>
							<th><h:outputText value="#{msg.edit}" /></th>
							<th><h:outputText value="#{msg.delete}" /></th>
						</tr>
					</thead>
					<tbody>
					<ui:repeat var="a_user" value="#{users.users}">
						<tr>
								<td><h:outputText value="#{a_user.username}" /></td>
								<td><h:outputText value="#{a_user.email}" /></td>
								<td><h:outputText value="#{a_user.address}" /></td>
								<td><h:commandLink value="#{msg.edit}"
										action="#{users.editUserAction(a_user.username)}" /></td>
								<td><h:commandLink value="#{msg.delete}"
										action="#{users.deleteUserAction(a_user.username)}" /></td>
							</tr>
					</ui:repeat>

					</tbody>

					<tfoot>
						<tr>
							<th><h:outputText value="#{msg.username}" /></th>
							<th><h:outputText value="#{msg.email}" /></th>
							<th><h:outputText value="#{msg.address}" /></th>
							<th><h:outputText value="#{msg.edit}" /></th>
							<th><h:outputText value="#{msg.delete}" /></th>
						</tr>
					</tfoot>
				</table>
			</div>


			<p></p>
			<ui:include src="../footer/footer.xhtml" />
		</body>


	</h:form>
</f:view>
</html>
